<?php
/*
	Obelix BB - Obelix Bulletin Board.
	
	Auteur : Fy - http://fee.lya.eu
	
	
	## Headers du forum ##
*/

// Session up.
session_start();

// Config file.
require_once('config.inc.php');

// Gestion de la langue.
putenv('LANG='.$config['board_lang']);
setlocale(LC_ALL, $config['board_lang']);
bindtextdomain('messages', 'locale/');
textdomain('messages');

// Fichiers de fonctions.
$page = $_GET['p'];
require_once('fonctions/fct.global.php');

// Fonctions forums.
if(empty($page) ||$page == 'topic' || $page == 'forum' || $page == 'post') {
	include_once('fonctions/fct.posts.php');
}

//Fonctions membres.
if($page == 'controls' || $page == 'members' || $page == 'view' || $page = 'log' || $page == 'subscribe') {
	include_once('fonctions/fct.members.php');
}


// Init.
mysql_connect($config['mysql_host'], $config['mysql_login'], $config['mysql_password']);
mysql_select_db($config['mysql_db']);
update_online();

load_theme();

?>